<template>
  <div class="mill">
    <div class="w">
      <Breadcrumb :breadcrumbs="breadcrumbs"/>
      <btc v-if="subCoinType === 'btc'"/>
      <bch v-else-if="subCoinType === 'bch' || subCoinType === 'bsv'"/>
      <dcr v-else-if="subCoinType === 'dcr' || subCoinType === 'zec'"/>
      <innovate v-else/>
    </div>
  </div>
</template>
<script>
import { mapGetters } from 'vuex';
import Breadcrumb from '@/components/Breadcrumb';
import btc from './components/btc';
import bch from './components/bch';
import dcr from './components/dcr';

import innovate from './components/innovate';

export default {
  name: 'mill',
  components: {
    Breadcrumb,
    btc,
    dcr,
    bch,
    innovate,
  },
  data() {
    return {
      breadcrumbs: [{
        path: '/',
        titleKey: 'router.home',
      }, {
        path: '/pools/mill',
        titleKey: 'router.mill',
      }],
    };
  },
  computed: {
    ...mapGetters(['subCoinType']),
  },
};
</script>
<style lang="scss" scoped>
.mill{
  /deep/ .table-box{
    background-color: #ffffff;
    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    border: solid 1px #e0e0e0;
    position: relative;
    >small{
      position: absolute;
      right: 0;
      top: -28px;
      line-height: 28px;
      font-size: 12px;
      color: #70c1b3;
    }
    .header{
      height: 50px;
      background-color: #f9f9f9;
      box-shadow: inset 0px -1px 0px 0px #f2f2f2;
      padding: 0 20px;
      display: flex;
      justify-content: space-between;
    }
    table{
      width: 100%;
      position: relative;
      tr{
        border-top: 1px solid #eaeaea;
        &:nth-of-type(even){
          background-color: #fbfbfb;
        }
        th{
          height: 30px;
          color: #ccc;
          font-weight: normal;
          i{
            margin-left: 6px;
            font-weight: bold;
          }
        }
        td{
          height: 60px;
          color: #333;
          &.status{
            &.active{
              color: #70c1b3;
            }
            &.inactive{
              color: #eb547c;
            }
            &.dead{
              color: #ccc;
            }
          }
        }
        th, td{
          font-size: 12px;
          white-space: nowrap;
          text-align: center;
          border: none;
          .todetail{
            color: #247ba0;
          }
          &:first-of-type{
            [type="checkbox"]{
              display: none;
              &+label{
                width: 16px;
                height: 16px;
                background-color: #ffffff;
                border-radius: 3px;
                border: solid 1px #eaeaea;
                display: inline-block;
                vertical-align: middle;
              }
              &:checked+label{
                border: none;
                &::after{
                  content: '\E67D';
                  font-size: 16px;
                  color: #70c1b3;
                  line-height: 16px;
                }
              }
            }
          }
        }
        .mask{
          position: absolute;
          left: 0;
          width: 100%;
          height: 60px;
          line-height: 60px;
          background-color: rgba(231, 229, 229, 0.75);
          font-size: 16px;
          color: #8ca1aa;
          text-align: center;
        }
      }
    }
  }
}
</style>
